package cn.com.headfree.point.dao.impl;

import cn.com.headfree.entity.TPointSetOver;
import cn.com.headfree.entity.TSalaryInfo;
import cn.com.headfree.point.dao.PointSetOverDao;
import com.gta.edu.sdk.base.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository("pointSetOverDao")
public class PointSetOverDaoImpl extends BaseDaoImpl<TPointSetOver> implements PointSetOverDao {


    @Override
    public List<TPointSetOver> findPointSetOverByYearAndOrgId(TPointSetOver pointSetOver) {
        StringBuilder sqlBuilder = new StringBuilder(
                "select * FROM t_point_set_over where 1=1 ");
        ArrayList<Object> arrayList = new ArrayList<Object>();
        sqlBuilder.append(" and org_id=? ");
        arrayList.add(pointSetOver.getOrgId());
        sqlBuilder.append(" and year=? ");
        arrayList.add(pointSetOver.getYear());
        return this.findAllBySQL(TPointSetOver.class, sqlBuilder.toString(), null, false, arrayList.toArray());
    }
}
